home *** CD-ROM | disk | FTP | other *** search
/ Small Time Crooks Press Kit / Small Time Crooks Press Kit.iso / pc / Small Time Crooks.dxr / Scripts_2.ls < prev    next >
Encoding:
Text File  |  2000-04-30  |  2.4 KB  |  83 lines

  1. on MenuHelpOn
  2.   go("Menu.Help")
  3. end
  4.  
  5. on MenuHelpOff
  6.   global gInitialMenuHelpOn
  7.   set gInitialMenuHelpOn to 1
  8.   go("Menu.Simple")
  9. end
  10.  
  11. on GetTextDescription textFileName
  12.   set textIndex to field "TextsIndex"
  13.   set previousItemDelimiter to the itemDelimiter
  14.   set the itemDelimiter to "@"
  15.   repeat with whichLine = 1 to the number of lines in textIndex
  16.     if item 1 of line whichLine of textIndex = textFileName then
  17.       set item2 to item 2 of line whichLine of textIndex
  18.       set the itemDelimiter to previousItemDelimiter
  19.       return item2
  20.     end if
  21.   end repeat
  22.   set the itemDelimiter to previousItemDelimiter
  23.   return EMPTY
  24. end
  25.  
  26. on GetPhototDescription photoFileName
  27.   set photoIndex to field "PhotosIndex"
  28.   set previousItemDelimiter to the itemDelimiter
  29.   set the itemDelimiter to "@"
  30.   repeat with whichLine = 1 to the number of lines in photoIndex
  31.     if item 1 of line whichLine of photoIndex = photoFileName then
  32.       set item2 to item 2 of line whichLine of photoIndex
  33.       set the itemDelimiter to previousItemDelimiter
  34.       return item2
  35.     end if
  36.   end repeat
  37.   set the itemDelimiter to previousItemDelimiter
  38.   return EMPTY
  39. end
  40.  
  41. on getTextFileName textName
  42.   set textIndex to field "TextsIndex"
  43.   set previousItemDelimiter to the itemDelimiter
  44.   set the itemDelimiter to "@"
  45.   repeat with whichLine = 1 to the number of lines in textIndex
  46.     if item 1 of line whichLine of textIndex = textName then
  47.       set item3 to item 3 of line whichLine of textIndex
  48.       set the itemDelimiter to previousItemDelimiter
  49.       return item3
  50.     end if
  51.   end repeat
  52.   set the itemDelimiter to previousItemDelimiter
  53.   return EMPTY
  54. end
  55.  
  56. on GetPhototFileName photoName
  57.   set photoIndex to field "PhotosIndex"
  58.   set previousItemDelimiter to the itemDelimiter
  59.   set the itemDelimiter to "@"
  60.   repeat with whichLine = 1 to the number of lines in photoIndex
  61.     if item 1 of line whichLine of photoIndex = photoName then
  62.       set item3 to item 3 of line whichLine of photoIndex
  63.       set the itemDelimiter to previousItemDelimiter
  64.       return item3
  65.     end if
  66.   end repeat
  67.   set the itemDelimiter to previousItemDelimiter
  68.   return EMPTY
  69. end
  70.  
  71. on SetPreviousSection
  72.   global gPreviousSection
  73.   set gPreviousSection to GetCurrentMainSection()
  74. end
  75.  
  76. on GetCurrentMainSection
  77.   set currentSubSection to getLabel()
  78.   set previousItemDelimiter to the itemDelimiter
  79.   set the itemDelimiter to "."
  80.   set the itemDelimiter to previousItemDelimiter
  81.   return item 1 of currentSubSection
  82. end
  83.